﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace ET.Score.Service.Dtos
{
    [DataContract]
    public class VobcInfoDto
    {
        #region 属性
        /// <summary>
        /// 自动编号
        /// </summary>
        [DataMember]
        public UInt32 VobcId { get; set; }
        /// <summary>
        /// 列车ID
        /// </summary>
        [DataMember]
        public UInt16 TrainId { get; set; }
        /// <summary>
        /// LinkId
        /// </summary>
        [DataMember]
        public UInt16 LinkId { get; set; }
        /// <summary>
        /// Link偏移量
        /// </summary>
        [DataMember]
        public UInt32 LinkOffset { get; set; }
        /// <summary>
        /// Link偏移量
        /// </summary>
        [DataMember]
        public byte LinkDriection { get; set; }
        /// <summary>
        /// 列车速度
        /// </summary>
        [DataMember]
        public UInt16 TrainSpeed { get; set; }
        /// <summary>
        /// 列车方向
        /// </summary>
        [DataMember]
        public byte TrainDirection { get; set; }
        /// <summary>
        /// 运行级别1、IL，2、BLOC，3、CBTC，4、FAO，默认CBTC
        /// </summary>
        [DataMember]
        public Byte RunLevel { get; set; }
        /// <summary>
        /// 运行模式 RM = 0x01,CM = 0x02, AM = 0x03, EUM = 0x04, RD = 0x05,默认AM
        /// </summary>
        [DataMember]
        public Byte TrainMode { get; set; }
        /// <summary>
        /// 最高预设2=Bloc，3=CBTC，4=FAO,默认FAO
        /// </summary>
        [DataMember]
        public Byte TrainPreinstall { get; set; }
        /// <summary>
        /// 门控方式 1=AA, 2=AM, 3=MM
        /// </summary>
        [DataMember]
        public Byte GateMode { get; set; }
        /// <summary>
        /// 门控状态 0xaa关闭0x55开放
        /// </summary>
        [DataMember]
        public Byte GateState { get; set; }
        /// <summary>
        /// 剩余停站时间
        /// </summary>
        [DataMember]
        public Byte RemaindTime { get; set; }
        /// <summary>
        /// MA终点类型
        /// </summary>
        [DataMember]
        public Byte MaEndType { get; set; }
        /// <summary>
        /// MA终点LinkId
        /// </summary>
        [DataMember]
        public UInt16 MaLinkId { get; set; }
        /// <summary>
        /// Malink偏移量
        /// </summary>
        [DataMember]
        public UInt32 MaLinkOffset { get; set; }
        /// <summary>
        /// Malink偏移量
        /// </summary>
        [DataMember]
        public Byte MaLinkDirection { get; set; }
        /// <summary>
        /// 运行控制模式0x55自动，0xaa手动
        /// </summary>
        [DataMember]
        public Byte RunControlMode { get; set; }
        /// <summary>
        /// 激活端,车头激活端
        /// </summary>
        [DataMember]
        public Byte ActivationEnd { get; set; }
        /// <summary>
        /// 紧急制动状态0x55激活，0xaa无
        /// </summary>
        [DataMember]
        public Byte EsbState { get; set; }
        /// <summary>
        /// 故障状态0x55正常，0xaa故障
        /// </summary>
        [DataMember]
        public Byte ErrorState { get; set; }
        /// <summary>
        /// 通信状态0x55正常，0xaa无通信
        /// </summary>
        [DataMember]
        public Byte CommunicationState { get; set; }
        /// <summary>
        /// 建立位置状态,0x55有位置0xaa丢失位置
        /// </summary>
        [DataMember]
        public Byte LocationState { get; set; }
        /// <summary>
        /// 救援指派ID
        /// </summary>
        [DataMember]
        public UInt16 RescueAssignedId { get; set; }
        /// <summary>
        /// 链接仿真车ID
        /// </summary>
        [DataMember]
        public UInt16 SimuLinkTrainId { get; set; }
        /// <summary>
        /// 记录日期时间
        /// </summary>
        [DataMember]
        public DateTime RecordTime { get; set; }
        /// <summary>
        /// 记录日期时间中的毫秒部分
        /// </summary>
        [DataMember]
        public UInt16 MilliSeconds { get; set; }
        /// <summary>
        /// 分组号
        /// </summary>
        [DataMember]
        public Byte GroupId { get; set; }
        /// <summary>
        /// 设备编号
        /// </summary>
        [DataMember]
        public Byte DeviceId { get; set; }


        /// <summary>
        /// 时间索引
        /// </summary>
        [DataMember]
        public UInt32 TimeId { get; set; }

        /// <summary>
        /// 数据类型
        /// </summary>
        [DataMember]
        public byte RecordType { get; set; }

        /// <summary>
        /// 数据块
        /// </summary>
        [DataMember]
        public byte[] Records { get; set; }

        /// <summary>
        /// 校验码
        /// </summary>
        [DataMember]
        public UInt32 CheckCode { get; set; }

        /// <summary>
        /// 帧描述
        /// </summary>
        [DataMember]
        public string FrameDescription { get; set; }

        /// <summary>
        /// 推荐速度
        /// </summary>
        [DataMember]
        public UInt16 SBI { get; set; }
        #endregion

    }
}
